<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:p="http://primefaces.org/ui"
      xmlns:f="http://xmlns.jcp.org/jsf/core">
    <ui:component>
        <ui:param name="rti" value="RTI"/>
        <ui:param name="si" value="SI"/>
        <ui:param name="oe" value="OE"/>
        <ui:param name="of" value="OF"/>
        <ui:param name="og" value="OG"/>
        <ui:param name="os" value="OS"/>
        <ui:param name="ot" value="OT"/>
        <ui:param name="ms" value="MS"/>
        <ui:param name="phd" value="PHD"/>
        <h:form>
            <p:menubar style="margin: auto; margin-left: 0; width: 80%; font-size: small;" rendered="#{!(loginMediator.adminLogedIn||loginMediator.profLogedIn)||loginMediator.studentLogedIn}">
                <p:menuitem value="Pocetna" outcome="home"/>
                <p:menuitem value="Zaposleni" outcome="employeePage.xhtml"/>
                <p:menuitem value="Obavestenja" outcome="infoPage.xhtml"/>
                <p:submenu label="Osnovne studije">
                    <p:menuitem value="RTI" action="#{departmentBean.getPredmetsByDepartment(rti)}"/>
                    <p:menuitem value="SI" action="#{departmentBean.getPredmetsByDepartment(si)}"/>
                    <p:menuitem value="OE" action="#{departmentBean.getPredmetsByDepartment(oe)}"/>
                    <p:menuitem value="OF" action="#{departmentBean.getPredmetsByDepartment(of)}"/>
                    <p:menuitem value="OG" action="#{departmentBean.getPredmetsByDepartment(og)}"/>
                    <p:menuitem value="OS" action="#{departmentBean.getPredmetsByDepartment(os)}"/>
                    <p:menuitem value="OT" action="#{departmentBean.getPredmetsByDepartment(ot)}"/>
                </p:submenu>
                <p:menuitem value="Master studije" action="#{masterPhdBean.getPredmetsByDepartment(ms)}"/>
                <p:menuitem value="Doktorske studije" action="#{masterPhdBean.getPredmetsByDepartment(phd)}"/>
                <p:menuitem value="Projekti"/>
                <p:submenu label="Nauka">
                    <p:menuitem value="Istrazivanja"/>
                    <p:menuitem value="Projekti" outcome="projectPage.xhtml"/>
                    <p:menuitem value="Publikacije" outcome="publicationPage.xhtml"/>
                </p:submenu>
                <p:submenu label="Servisi">
                    <p:menuitem value="Fakultet" url="http://www.etf.bg.ac.rs/"/>
                    <p:menuitem value="Studentski servisi" url="https://student.etf.rs/security/login.jsf"/>
                    <p:menuitem value="Mejling liste" url="https://lists.etf.rs"/>
                    <p:menuitem value="Paviljon" url="http://rti.etf.bg.ac.rs/sale/"/>
                </p:submenu>
                <p:menuitem value="Kontakt"/>
                <f:facet name="options">   
                    <p:outputLabel value="#{loginMediator.currUserLabel}"/>
                    <p:button  value="Login" outcome="loginPage.xhtml"  rendered="#{!(loginMediator.adminLogedIn||loginMediator.profLogedIn||loginMediator.studentLogedIn)}"/>  
                    <p:commandButton  value="Logout" action="#{loginMediator.logOut()}"  rendered="#{(loginMediator.adminLogedIn||loginMediator.profLogedIn||loginMediator.studentLogedIn)}"/> 
                 </f:facet>
            </p:menubar>
        </h:form>
    </ui:component>
</html>

